<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../vue.global.js"></script>
</head>
<body>
<div id="app"></div>
<script>
    const app = Vue.createApp({
        data() {
            return {
                message: "<strong>hello world</strong>",
                disabled: true,
                show: false,
                name: 'title'
            }
        },
        methods: {
            handleClick(){
                alert("123456")
            }
        },
        // 插值表达式防止转义v-html
        template: `
          <div>{{ message }}</div>
          <div v-html="message" :title="message"></div>
          <input :disabled="disabled">
          <div>{{'a' + 'b'}}</div>
          <div v-once @click="handleClick">{{message}}</div>
          <div v-if="show">if是true</div>
          <div v-else="show">if是false</div>
        `
    });
    const vm = app.mount("#app");
    /**
     * 简写：
     * v-bind:title="" -> :title=""
     * v-on:click="" -> @click=""
     * 动态属性
     * :[name] = "message"
     * 修饰符
     * @click.prevent=""
     */
</script>
</body>
</html>